package sut.edu.zyp.dormitory.manage.entity;

import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EntityListeners;
import javax.persistence.Table;
import java.io.Serializable;
import java.sql.Date;
import java.sql.Time;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * 来访信息实体
 *
 * @author yxh
 * @version 0.0.1
 * @since 0.0.1
 */
@Entity
@EntityListeners(AuditingEntityListener.class)
@Table(name = "register")
public class RegisterEntity extends AbstractBaseEntity implements Serializable {


    @Column(name = "visitor_name", length = 32)
    private String visitorName;

    @Column(name = "visitor_phone", length = 32)
    private String visitor_phone;


    @Column(name = "visit_time",nullable = false, columnDefinition = "TIME")
    private Time visit_time;

    @Column(name = "leave_time",nullable = false, columnDefinition = "TIME")
    private Time leave_time;


    @Column(name = "visit_date", nullable = false, columnDefinition = "DATE")
    private Date visitDate;

    @Column(name = "visit_reason", length = 32)
    private String visit_reason;

    @Column(name = "staff", length = 32)
    private String staff;



    public String getVisitor_name() {
        return visitorName;
    }

    public void setVisitor_name(String visitor_name) {
        this.visitorName = visitor_name;
    }

    public String getVisitor_phone() {
        return visitor_phone;
    }

    public void setVisitor_phone(String visitor_phone) {
        this.visitor_phone = visitor_phone;
    }

    public Time getVisit_time() {
        return visit_time;
    }

    public void setVisit_time(Time visit_time) {
        this.visit_time = visit_time;
    }

    public Time getLeave_time() {
        return leave_time;
    }

    public void setLeave_time(Time leave_time) {
        this.leave_time = leave_time;
    }

    public String getVisit_reason() {
        return visit_reason;
    }

    public void setVisit_reason(String visit_reason) {
        this.visit_reason = visit_reason;
    }

    public String getStaff() {
        return staff;
    }

    public void setStaff(String staff) {
        this.staff = staff;
    }

    public Date getVisit_date() {
        return visitDate;
    }

    public void setVisit_date(Date visit_date) {
        this.visitDate = visit_date;
    }
}
